﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Elderos.Ontology;

namespace Elderos.Highlight.Rules
{
    [RankingRule("SynonymDot", RuleType.Synonym)]
    public class RuleSynonymDot : SynonymRule
    {
        public RuleSynonymDot(IOntologyData ontology) : base(ontology)
        {
        }

        public override IRuleResult EmptyResult
        {
            get { return new BinomialResult(Name, false);}
        }

        protected override IRuleResult ComputeResult(string synonym)
        {
            bool success = synonym.IndexOf('.') >= 0;
            return new BinomialResult(Name, success);
        }
    }
}
